<?php

namespace app\custom\model;

use app\common\library\Model;

class Custom extends Model
{
	protected $append = ['last_login_time_text'];

    public function getLastLoginTimeTextAttr($value,$data){
        return $data['last_login_time'] ? date('Y-m-d H:i:s',$data['last_login_time']) : '-';
    }
	/**
	 * [ParentCustomInfo 上级客户]
	 */
	protected function ParentCustomInfo(){
		return $this->hasOne("app\\custom\\model\\Custom",'parent_current_id', 'current_id');
	}
	/**
	 * [FeeSettingInfo 费用设置]
	 */
	protected function FeeSettingInfo(){
		return $this->hasOne("app\\custom\\model\\CustomFeeSetting",'custom_id', 'current_id');
	}
}
